class Message:
    def __init__ (self, src, dest, time, data, mtype, bsrc):
        self.src = src;
        self.dest = dest; # dest could be an array for multicast. I'll use code: for d in dest: send msg(dest); to send.
        self.time = time;
        self.data = data;
        self.mtype = mtype;
        self.mid=0;
        self.destArray=dest;
        self.broadcastSource = bsrc

    def __str__(self):
        return "Message from %s id=%d to %s type=%s data=%s time=%s broadcastsrc %s" %(
            self.src, self.mid, self.dest, self.mtype, self.data, self.time, self.broadcastSource);

    def getDest(self):
        return self.dest;

    def setDest(self, newDest):
        self.dest = newDest;

    def clone(self):
        return Message(self.src, self.dest, self.time, self.data, self.mtype, self.broadcastSource);

    def getID(self):
        return self.mid;

    def setID(self,mid):
        self.mid=mid;
